#ifndef __CTSBuilder_H__
#define __CTSBuilder_H__
#include "CESParser.h"
#include "CTS.h"
#include <vector>
#include <map>
#include <set>

#define VIDEO_PID 65//49//65
#define AUDIO_PID 68//52//68

class CTSBuilder
{
public:
	CTSBuilder(std::set<unsigned int> pids);
	~CTSBuilder();

	void findTS(CESParser& cESParser);
	
private:
	int _BuildTS(const char* cBuffer, int nBufferSize);
    void _add2List();

private:
	//TSPacket 
	char m_sLastTs[188];
	int m_nCurrentTsSize;
public:	
	std::vector<CTS*> m_mTs; //CTS INSTEAD OF 
	std::set<unsigned int> m_pids;
};
#endif //__CTSBuilder_H__